home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
perfTuning
/
glprof.notes
< prev
next >
Wrap
Text File
|
1994-08-01
|
4KB
|
104 lines
GLprof Notes
============
o GLprof can give estimation of where graphics bottlenecks are
for tuning the database.
- will show if views are inherently fill or transform limited
fill limited: can have more complex geom in LODs
xform limited: need to simplify or add LODs for small objects
- will also point out lots of mode changes
- gives scene statistics, such as number of transformed vertices,
number of polygons, number of pixels fixed with different modes
- don't need to relink program or run single process
- handy define for inserting glprof tags (compile with libglprof.a):
#define GLPROF_TAG(_name) { \
cmov2i(99999,99999); \
glprof_object(_name); \
}
cmov is used to move the character position off screen such that
the charstr in glprof_object() gets clipped, otherwise, it will
affect the simulation.
- if used with gldebug, gldebug history output will be annotated because
of the charstrs in glprof_object.
- look at GLPTT for more information
o UI
cannot do file redirection on command line (can only do what exec will take)
"a" key will print all data (mouse click prints data between tags)
"pass"
"view" texture data not recorded but the mode is calculated.
"texture"
- turns texturing on and off for the entire application
- accounts for total transform time of texture coords.
- does this account for data bandwidth time???
- doesn't understand texdef/tevdef/texbind/tevbind or texgen
- doesn't understand charstr, lrectread/write, mssize; anything not
supported will not be printed in the text window
-
GLprof only understands 60HZ monitors
o CPU
if IO3 is present host overhead will be calculated, but there will be
inflation of timing therefore may not be as CPU bound as trace indicates.
Highly tuned drawing loops will be affected because IO3 is checked for each
GL call
o prof/pixie reference
IRIS-4D Seried Compiler Guide [#007-0905-030]
o some quick debug/pixie notes
pixie and prof append the pid number to the Counts and Addrs files
use unshared libraries for prof and pixie
run set number of frames and have an auto exit for pixie and prof.
PC sampling - gives runtime average of time spent
- compile -p
- setenv PROFDIR to directory where you wish to store data
files (pid.progname)
- prof progname pid.progname for the proc of interest
With basic-block counting use -invocations and -procedures
to see significant routines and
where heavily called routines are called from
prof -pixie -p -i -clock Nmhz -l
Basic Block Counting - idealized statistics
o if using Performer pre-draw callbacks on nodes can give out glprof_object
tags that then will appear in a glprof trace.
- this has the disadvantage of turning off sorting which may
increase the number of mode changes and also the balance of
bottlenecks in the scene because it may change the drawing order.
- it has the advantage of giving per-object drawing statistics
and will say whether or not a specific object was
fill or transform limited
sample code for traversal that installs/removes the glprof object tags: /usr/src/Performer/src/pguide/trav.c has example user traversal
code and an example that installs and removes glprof callbacks.
/usr/src/Performer/src/pguide/profile.c uses this traverser:
if (mode = Shared->glProfTravMode)
{
/* mode = 1 - install glprof tag node callbacks
* mode = 0 - remove glprof tag node callbacks
*/
pfNotify(PFNFY_NOTICE, PFNFY_PRINT,
"Doing glprof traversal: %d\n", mode);
DoTraversal((pfNode *)scene, DBGT_GLPROF, mode);
Shared->doGLProfTrav = 0;
}